API – Developers Docs API – Developers Docs
  • Cyberpac
  • Addon Payments
  • POS integrated Payments
  • SpanishSwitch to Spanish
API – Developers Docs API – Developers Docs
API – Developers Docs
  • Cyberpac
  • Addon Payments
  • POS integrated Payments
  • SpanishSwitch to Spanish

PAY BY LINK

  • Icono de carpeta cerrada Icono de apertura de carpetaAPI Authentication
  • Icono de carpeta cerrada Icono de apertura de carpetaAccess By API
  • Icono de carpeta cerrada Icono de apertura de carpetaAccess By Web
  • Icono de carpeta cerrada Icono de apertura de carpetaAPI Explorer
  • Icono de carpeta cerrada Icono de apertura de carpetaFeatures
    • Auto-generated Customer Id
    • Backoffice tutorial
    • Code Format
    • Status Flow
    • Error Codes
    • Date Time &
    • Countries
    • Currencies

API Explorer

Before you begin

OAuth2 Client Credentials

All operations require to be authenticated by OAuth2 client credentials.

The client_id and client_secret will be provided by AddonPayments as part of the Online Boarding.

See API Authentication for more information.

Security Scheme Type OAuth2
clientCredentials OAuth Flow
Token URL: https://api.easypaymentgateway.com/epgpay-auth/login
Scopes:

    Pay By Link

    Create Pay By Link

    Create a Pay By Link which shoppers could be redirected to Addon Payments hosted cashier to perform a payment.

    Passing off the Merchant Id and the Pay By Link object which contains the invoice data.

    Returning the created Pay By Link which contains the url field.

    The list of payment solutions depends on the Merchant, Product, currency and country of the request.

    For more information, refer to Pay By Link overview.

    Authorizations:
    OAuth2 Client Credentials
    Request Body schema: application/json

    Pay By Link object, which contains all the information about the payment, customer and extra payment information.

    amount

    required
    number

    Payment’s amount

    country

    required
    string

    Payment’s country in ISO 3166-1 alpha-2.

    List of available countries

    currency

    required
    string 3 characters

    Currency of the transaction in ISO-4217, 3 digit code.

    List of available currencies

    merchantId

    required
    integer

    AddonPayments Merchant Identifier.

    Provided by On Boarding process.

    merchantTransactionId

    required
    string <= 45 characters

    Pay By Link’s merchant transaction identifier.

    productId

    required
    integer

    AddonPayments Product Identifier which is associated the Payment.

    Provided by On Boarding process.

    code
    string <= 12 characters
    Deprecated

    Pay By Link’s merchant code.

    Refer to Pay By Link Code Format for more information.

    customerId
    string

    The identifier of the customer in your system.

    If you don’t provide a value a random identifier will be assigned. Refer to Auto Generated Customer Id section for more details.

    description
    string

    Invoice’s description

    dueDate
    string

    The date when the invoice will expire. It is in ISO-8601 format. After this date the invoice will be marked as EXPIRED see status flow.

    Refer to ISO-8601 format for more details.

    language
    string
    Default: “EN”
    Enum: “ES” “EN”

    Hosted cashier language

    merchantParams
    string <= 250 characters ([a-zA-Z0-9-]+:[a-zA-Z0-9-]+;?)+

    List of extra params to a merchant with key value format and semicolon separator.

    referenceId
    string [ 4 .. 12 ] characters ^[0-9]{4})([a-zA-Z0-9]{0,8}$

    Pay By Link’s internal reference identifier. If its empty and merchantTxnId is valid then referenceId will be filled with this value.

    Responses

    200 OK
    RESPONSE SCHEMA: application/json
    amount
    required
    number <float>

    Payment’s amount

    country
    required
    string

    Payment’s country in ISO 3166-1 alpha-2.

    List of available countries

    currency
    required
    string 3 characters

    Currency of the transaction in ISO-4217, 3 digit code.

    List of available currencies

    customerId
    required
    string

    The identifier of the customer in your system.

    If you don’t provide a value a random identifier will be assigned. Refer to Auto Generated Customer Id section for more details.

    dueDate
    required
    string <date-time>

    The date when the invoice will expire. It is in ISO-8601 format. After this date the invoice will be marked as EXPIRED see status flow.

    Refer to ISO-8601 format for more details.

    id
    required
    string

    Pay By Link Identifier

    merchantId
    required
    integer <int64>

    AddonPayments Merchant Identifier.

    Provided by On Boarding process.

    merchantTransactionId
    required
    string <= 45 characters

    Pay By Link’s merchant transaction identifier.

    productId
    required
    integer <int64>

    AddonPayments Product Identifier which is associated the Payment.

    Provided by On Boarding process.

    status
    required
    string
    Enum: “CREATED” “EXPIRED” “CANCELLED” “PAID”

    Pay By Link’ status.

    Refer to Pay By Link Status flow for more information

    url
    required
    string <url>

    Pay By Link URL, where the customer has to be redirected

    code
    string <= 12 characters
    Deprecated

    Pay By Link’s merchant code.

    Refer to Pay By Link Code Format for more information.

    description
    string

    Invoice’s description

    language
    string
    Default: “EN”
    Enum: “ES” “EN”

    Hosted cashier language

    merchantParams
    string <= 250 characters ([a-zA-Z0-9-]+:[a-zA-Z0-9-]+;?)+

    List of extra params to a merchant with key value format and semicolon separator.

    referenceId
    string [ 4 .. 12 ] characters ^[0-9]{4})([a-zA-Z0-9]{0,8}$

    Pay By Link’s internal reference identifier. If its empty and merchantTxnId is valid then referenceId will be filled with this value.

    400 Bad Request
    Errors
    Array of objects
    List of Errors
    Array[

    codestring
    Unique error code
    sourceobject
    pointerstring
    Object or field which produces an error
    titlestring
    Error title
    ]
    401 Unauthorized
    403 Forbidden
    POST/pay-by-link

    Request samples

    • Payload
    • cURL
    • C# - RestSharp
    • PHP - HTTP_Request2
    
    Content type
    application/json
    {
    "merchantId": 10450,
    "productId": 104500001,
    "code": "10450-1234alphanum",
    "merchantTransactionId": "1234abcd567efg",
    "description": "Paying for shoes bought Jan 1st",
    "currency": "EUR",
    "amount": 32.99,
    "country": "GB",
    "language": "ES",
    "dueDate": "2025-01-31T08:00:00.000Z",
    "customerId": "xx2211223",
    "referenceId": "1234abcd1234",
    "merchantParams":
     "merchantName:Daniel;merchantSurname:Rodriguez"
    }
    curl --location --request POST 'https://api.easypaymentgateway.com/invoice-service/pay-by-link' \
    --header 'Authorization: Bearer YOUR_OATH2_TOKEN' \
    --header 'Content-Type: application/json' \
    --data-raw '
    "merchantId" : YOUR_MERCHANT_ID,
    "productId" : YOUR_PRODUCT_ID,
    "amount" : 11.50,
    "currency" : "GBP",
    "country" : "GB",
    "code" : "00001b345678"
    }'
    var client = new RestClient("https://api.easypaymentgateway.com/invoice-service/pay-by-link")
    client.Timeout = -1
    var request = new RestRequest(Method.POST)
    request.AddHeader("Authorization", "Bearer YOUR_OATH2_TOKEN")
    request.AddHeader("Content-Type", "application/json")
    var body = @"{" + "\n" +
    @" ""merchantId"" : YOUR_MERCHANT_ID," + "\n" +
    @" ""productId"" : YOUR_PRODUCT_ID," + "\n"
    @" ""amount"" : 11.50," + "\n"
    @" ""currency"" : ""GBP""," + "\n"
    @" ""country"" : ""GB""," + "\n"
    @" ""code"" : ""00001b345678""" + "\n"
    @"}"
    request.AddParameter("application/json", body, ParameterType.RequestBody)
    IRestResponse response = client.Execute(request)
    Console.WriteLine(response.Content)

    require_once 'HTTP/Request2.php'
    $request = new HTTP_Request2()
    $request->setUrl('https://api.easypaymentgateway.com/invoice-service/pay-by-link')
    $request->setMethod(HTTP_Request2::METHOD_POST)
    $request->setConfig(array(
    'follow_redirects' => TRUE<
    ))
    $request->setHeader(array(
    'Authorization' => 'Bearer YOUR_OATH2_TOKEN',
    'Content-Type' => 'application/json'
    ))
    $request->setBody('{
    "merchantId" : YOUR_MERCHANT_ID,\n
    "productId" : YOUR_PRODUCT_ID,
    "amount" : 11.50,
    "currency" : "GBP",
    "country" : "GB",
    "code" : "00001b345678"
    }')
    try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
    echo $response->getBody()
    }
    else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
    }
    }
    catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage()
    }

    Response samples

    • 200
    • 400
    
    Content type
    application/json
    
    Example
    Minimun success
    {
    "id": "60e83154e0bb74627dfcdc13",
    "merchantId": 1234,
    "productId": 4567,
    "amount": 11.5,
    "status": "CREATED",
    "dueDate": "2021-08-09T11:21:56.512153Z",
    "code": "1234-00001b345678",
    "currency": "GBP",
    "customerId": "PBL.f5f819ac-06e2-4dbb-a8ae-ca7516e918db",
    "url": "https://invoice.epgpay.com/U5BR"
    }
    
    Content type
    application/json

    Example Missing 'amount' field
    {
    "errors": [
    {
    "source": {
    "pointer": "/amount"
    },
    "code": "NotNull.payByLinkDto.amount",
    "title": "must not be null"
    }
    ] }

    Get Pay By Link

    Get a Pay By Link passing off its identifier as path argument.

    AUTHORIZATIONS:  OAuth2 Client Credentials
    PATH PARAMETERS
    pay_by_link_id
    required
    string

    Pay By Link Identifier

    Responses

    200 OK
    RESPONSE SCHEMA: application/json
    amount
    required
    number <float>

    Payment's amount

    country
    required
    string

    Payment's country in ISO 3166-1 alpha-2.

    List of available countries

    currency
    required
    string 3 characters

    Currency of the transaction in ISO-4217, 3 digit code.

    List of available currencies

    customerId
    required
    string

    The identifier of the customer in your system.

    If you don't provide a value a random identifier will be assigned. Refer to Auto Generated Customer Id section for more details.

    dueDate
    required
    string <date-time>

    The date when the invoice will expire. It is in ISO-8601 format. After this date the invoice will be marked as EXPIRED see status flow.

    Refer to ISO-8601 format for more details.

    id
    required
    string

    Pay By Link Identifier

    merchantId
    required
    integer <int64>

    AddonPayments Merchant Identifier.

    Provided by On Boarding process.

    merchantTransactionId
    required
    string <= 45 characters

    Pay By Link's merchant transaction identifier.

    productId
    required
    integer <int64>

    AddonPayments Product Identifier which is associated the Payment.

    Provided by On Boarding process.

    status
    required
    string
    Enum: "CREATED" "EXPIRED" "CANCELLED" "PAID"

    Pay By Link' status.

    Refer to Pay By Link Status flow for more information

    url
    required
    string <url>

    Pay By Link URL, where the customer has to be redirected

    code
    string <= 12 characters
    Deprecated

    Pay By Link's merchant code.

    Refer to Pay By Link Code Format for more information.

    description
    string

    Invoice's description

    language
    string
    Default: "EN"
    Enum: "ES" "EN"

    Hosted cashier language

    merchantParams
    string <= 250 characters ([a-zA-Z0-9-]+:[a-zA-Z0-9-]+;?)+

    List of extra params to a merchant with key value format and semicolon separator.

    referenceId
    string [ 4 .. 12 ] characters ^[0-9]{4})([a-zA-Z0-9]{0,8}$

    Pay By Link's internal reference identifier. If its empty and merchantTxnId is valid then referenceId will be filled with this value.

    401 Unauthorized
    403 Forbidden
    404 Not found
    RESPONSE SCHEMA: application/json
    error
    string

    Http Error Message

    message
    string

    Extra message

    path
    string

    requested path

    status
    string

    Http Error Status

    timestamp
    string <date-time>

    Date and Time when is happened the error.

    GET/pay-by-link{pay_by_link_id}

    Request samples

    • cURL
    • C# - RestSharp
    • PHP - HTTP_Request2
    curl --location --request GET 'https://api.easypaymentgateway.com/invoice-service/pay-by-link/60d9ce980d46f955c931e9d2' \
    --header 'Authorization: Bearer YOUR_OATH2_TOKEN'
    var client = new RestClient("https://api.easypaymentgateway.com/invoice-service/pay-by-link/60d9ce980d46f955c931e9d2");
    client.Timeout = -1;
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer YOUR_OATH2_TOKEN");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    <?php
    require_once 'HTTP/Request2.php';
    $request = new HTTP_Request2();
    $request->setUrl('https://api.easypaymentgateway.com/invoice-service/pay-by-link/60d9ce980d46f955c931e9d2');
    $request->setMethod(HTTP_Request2::METHOD_GET);
    $request->setConfig(array( 'follow_redirects' => TRUE ));
    $request->setHeader(array( 'Authorization' => 'Bearer YOUR_OATH2_TOKEN' ));
    try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
    echo $response->getBody();
    }
    else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase();
    }
    }
    catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
    }

    Response samples

    • 200
    • 400
    
    Content type
    application/json
    {
    "id": "60e83154e0bb74627dfcdc13",
    "merchantId": 1234,
    "productId": 4567,
    "amount": 11.5,
    "status": "CREATED",
    "dueDate": "2021-08-09T11:21:56.512153Z",
    "code": "1234-00001b345678",
    "currency": "GBP",
    "customerId": "PBL.f5f819ac-06e2-4dbb-a8ae-ca7516e918db",
    "url": "https://invoice.epgpay.com/U5BR",
    "referenceId": "xxxreference"
    }
    
    Content type
    application/json
    {
    "timestamp": "2021-06-30T08:23:23.935+0000",
    "path": "/pay-by-link/60dc29a7ccbab61bb8d07a7d",
    "status": 404,
    "error": "Not Found",
    "message": null }

    Update Pay By Link

    Update an Pay By Link passing off the Pay By Link id as path parameter.

    Returning the updated Pay By Link, keeping the same Pay By Link id.

    AUTHORIZATIONS:  OAuth2 Client Credentials
    PATH PARAMETERS
    pay_by_link_id
    required
    string

    Pay By Link Identifier

    REQUEST BODY SCHEMA: application/json

    Pay By Link object, which contains all the information about the Pay By Link.

    amount
    required
    number <float>

    Payment’s amount

    country
    required
    string

    Payment’s country in ISO 3166-1 alpha-2.

    List of available countries

    currency
    required
    string 3 characters

    Currency of the transaction in ISO-4217, 3 digit code.

    List of available currencies

    customerId
    required
    string

    The identifier of the customer in your system.

    If you don’t provide a value a random identifier will be assigned. Refer to Auto Generated Customer Id section for more details.

    dueDate
    required
    string <date-time>

    The date when the invoice will expire. It is in ISO-8601 format. After this date the invoice will be marked as EXPIRED see status flow.

    Refer to ISO-8601 format for more details.

    merchantId
    required
    integer <int64>

    AddonPayments Merchant Identifier.

    Provided by On Boarding process.

    merchantTransactionId
    required
    string <= 45 characters

    Pay By Link’s merchant transaction identifier.

    productId
    required
    integer <int64>

    AddonPayments Product Identifier which is associated the Payment.

    Provided by On Boarding process.

    status
    required
    string
    Enum: “CREATED” “CANCELLED”

    Pay By Link’ status.

    Refer to Pay By Link Status flow for more information.

    Note: You could only update CREATED Pay By Links. Otherwise, it will fail.

    code
    string <= 12 characters
    Deprecated

    Pay By Link’s merchant code.

    Refer to Pay By Link Code Format for more information.

    description
    string

    Invoice’s description

    id
    string

    Pay By Link Identifier.

    This field is optional but if it’sent, then has to match with {pay_by_link_id} of the path url. Otherwise, it produces an error.

    language
    string
    Default: “EN”
    Enum: “ES” “EN”

    Hosted cashier language

    merchantParams
    string <= 250 characters ([a-zA-Z0-9-]+:[a-zA-Z0-9-]+;?)+

    List of extra params to a merchant with key value format and semicolon separator.

    referenceId
    string [ 4 .. 12 ] characters ^[0-9]{4})([a-zA-Z0-9]{0,8}$

    Pay By Link’s internal reference identifier. If its empty and merchantTxnId is valid then referenceId will be filled with this value.

    Responses

    200 OK
    RESPONSE SCHEMA: application/json
    amount
    required
    number <float>

    Payment's amount

    country
    required
    string

    Payment's country in ISO 3166-1 alpha-2.

    List of available countries

    currency
    required
    string 3 characters

    Currency of the transaction in ISO-4217, 3 digit code.

    List of available currencies

    customerId
    required
    string

    The identifier of the customer in your system.

    If you don't provide a value a random identifier will be assigned. Refer to Auto Generated Customer Id section for more details.

    dueDate
    required
    string <date-time>

    The date when the invoice will expire. It is in ISO-8601 format. After this date the invoice will be marked as EXPIRED see status flow.

    Refer to ISO-8601 format for more details.

    id
    required
    string

    Pay By Link Identifier

    merchantId
    required
    integer <int64>

    AddonPayments Merchant Identifier.

    Provided by On Boarding process.

    merchantTransactionId
    required
    string <= 45 characters

    Pay By Link's merchant transaction identifier.

    productId
    required
    integer <int64>

    AddonPayments Product Identifier which is associated the Payment.

    Provided by On Boarding process.

    status
    required
    string
    Enum: "CREATED" "EXPIRED" "CANCELLED" "PAID"

    Pay By Link' status.

    Refer to Pay By Link Status flow for more information

    url
    required
    string <url>

    Pay By Link URL, where the customer has to be redirected

    code
    string <= 12 characters
    Deprecated

    Pay By Link's merchant code.

    Refer to Pay By Link Code Format for more information.

    description
    string

    Invoice's description

    language
    string
    Default: "EN"
    Enum: "ES" "EN"

    Hosted cashier language

    merchantParams
    string <= 250 characters ([a-zA-Z0-9-]+:[a-zA-Z0-9-]+;?)+

    List of extra params to a merchant with key value format and semicolon separator.

    referenceId
    string [ 4 .. 12 ] characters ^[0-9]{4})([a-zA-Z0-9]{0,8}$

    Pay By Link's internal reference identifier. If its empty and merchantTxnId is valid then referenceId will be filled with this value.

    400 Bad Request
    Array ()
    code
    string
    Unique error code
    object
    pointer
    string
    Object or field which produces an error
    title
    string
    Error title
    401 Unauthorized
    403 Forbidden
    POST/pay-by-link{pay_by_link_id}

    Request samples

    Payload
    
    Content type
    application/json
    { "id": "60dc27beccbab61bb8d07a7c",
    "status": "CREATED",
    "merchantId": 10450,
    "productId": 104500001,
    "code": "10450-1234alphanum",
    "merchantTransactionId": "1234abcd567efg",
    "description": "Paying for shoes bought Jan 1st",
    "currency": "EUR",
    "amount": 32.99,
    "country": "GB",
    "language": "ES",
    "dueDate": "2025-01-31T08:00:00.000Z",
    "customerId": "xx2211223",
    "referenceId": "1234abcd1234",
    "merchantParams":
    "merchantName:Daniel;merchantSurname:Rodriguez" }
    cURL
    
    curl --location --request POST 'https://api.easypaymentgateway.com/invoice-service/pay-by-link/60dc27beccbab61bb8d07a7c' \
    --header 'Authorization: Bearer YOUR_OATH2_TOKEN' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "id" : "60dc27beccbab61bb8d07a7c"
    "merchantId" : YOUR_MERCHANT_ID,
    "productId" : YOUR_PRODUCT_ID,
    "amount" : 11.50,
    "currency" : "GBP",
    "country" : "GB",
    "code" : "00001b345678" }'
    C# - RestSharp
    
    var client = new
    RestClient("https://api.easypaymentgateway.com/invoice-service/pay-by-link/60dc27beccbab61bb8d07a7c");
    client.Timeout = -1;
    var request = new RestRequest(Method.POST);
    request.AddHeader("Authorization", "Bearer YOUR_OATH2_TOKEN");
    request.AddHeader("Content-Type", "application/json");
    var body = @"{" + "\n" +
    @" ""id"" : ""60dc27beccbab61bb8d07a7c""" + "\n" +
    @" ""merchantId"" : YOUR_MERCHANT_ID," + "\n" +
    @" ""productId"" : YOUR_PRODUCT_ID," + "\n" +
    @" ""amount"" : 11.50," + "\n" +
    @" ""currency"" : ""GBP""," + "\n" +
    @" ""country"" : ""GB""," + "\n" +
    @" ""code"" : ""00001b345678""" + "\n" +
    @"}";
    request.AddParameter("application/json", body, ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    PHP - HTTP_Request2
    
    <?php
    require_once 'HTTP/Request2.php';
    $request = new HTTP_Request2();
    $request->setUrl('https://api.easypaymentgateway.com/invoice-service/pay-by-link/60dc27beccbab61bb8d07a7c');
    $request->setMethod(HTTP_Request2::METHOD_POST);
    $request->setConfig(array( 'follow_redirects' => TRUE ));
    $request->setHeader(array( 'Authorization' => 'Bearer YOUR_OATH2_TOKEN', 'Content-Type' => 'application/json' ));
    $request->setBody('{\n "id" : "60dc27beccbab61bb8d07a7c",\n "merchantId" : YOUR_MERCHANT_ID,\n "productId" : YOUR_PRODUCT_ID,\n "amount" : 11.50,\n "currency" : "GBP",\n "country" : "GB",\n "code" : "00001b345678"\n}');
    try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
    echo $response->getBody();
    }
    else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase();
    }
    }
    catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
    }

    Response samples

    • 200
    • 400
    
    Content type
    application/json

    Example
    Minimun success
    {
    "id": "60e83154e0bb74627dfcdc13",
    "merchantId": 1234,
    "productId": 4567,
    "amount": 11.5,
    "status": "CREATED",
    "dueDate": "2021-08-09T11:21:56.512153Z",
    "code": "1234-00001b345678",
    "currency": "GBP",
    "customerId": "PBL.f5f819ac-06e2-4dbb-a8ae-ca7516e918db",
    "url": "https://invoice.epgpay.com/U5BR" }
    
    Content type
    application/json

    Example
    Missing 'amount' field
    {
    "errors": [
    {
    "source": {},
    "code": "NotNull.payByLinkCreateRequest.amount",
    "title": "must not be null"
    }
    ] }

    Cancel Pay By Link

    Cancel a CREATED Pay By Link.

    Once the operation is completed, the Pay By Link will have CANCELLED status.

    This operation is only allowed when the Invoice status is CREATED. Otherwise, the cancel will fails.

    AUTHORIZATIONS: OAuth2 Client Credentials
    PATH PARAMETERS
    pay_by_link_id
    required
    string

    Pay By Link Identifier

    Responses

    200 OK
    RESPONSE SCHEMA: application/json
    amount
    required
    number <float>

    Payment's amount

    country
    required
    string

    Payment's country in ISO 3166-1 alpha-2.

    List of available countries

    currency
    required
    string 3 characters

    Currency of the transaction in ISO-4217, 3 digit code.

    List of available currencies

    merchantId
    required
    integer <int64>

    AddonPayments Merchant Identifier.

    Provided by On Boarding process.

    merchantTransactionId
    required
    string <= 45 characters

    Pay By Link's merchant transaction identifier.

    productId
    required
    integer <int64>

    AddonPayments Product Identifier which is associated the Payment.

    Provided by On Boarding process.

    code
    string <= 12 characters
    Deprecated

    Pay By Link's merchant code.

    Refer to Pay By Link Code Format for more information.

    customerId
    string

    The identifier of the customer in your system.

    If you don't provide a value a random identifier will be assigned. Refer to Auto Generated Customer Id section for more details.

    description
    string

    Invoice's description

    dueDate
    string <date-time>

    The date when the invoice will expire. It is in ISO-8601 format. After this date the invoice will be marked as EXPIRED see status flow.

    Refer to ISO-8601 format for more details.

    id
    string

    Pay By Link Identifier

    language
    string
    Default: "EN"
    Enum: "ES" "EN"

    Hosted cashier language

    merchantParams
    string <= 250 characters ([a-zA-Z0-9-]+:[a-zA-Z0-9-]+;?)+

    List of extra params to a merchant with key value format and semicolon separator.

    referenceId
    string [ 4 .. 12 ] characters ^[0-9]{4})([a-zA-Z0-9]{0,8}$

    Pay By Link's internal reference identifier. If its empty and merchantTxnId is valid then referenceId will be filled with this value.

    status
    string
    Enum: "CREATED" "EXPIRED" "CANCELLED" "PAID"

    Pay By Link' status.

    Refer to Pay By Link Status flow for more information

    url
    string <url>

    Pay By Link URL, where the customer has to be redirected

    400 Bad request
    RESPONSE SCHEMA: application/json
    Array of objects

    List of Errors

    Array ()
    code
    string

    Unique error code

    object
    pointer
    string

    Object or field which produces an error

    title
    string

    Error title

    401 Unauthorized
    403 Forbidden

    POST/pay-by-link/{pay_by_link_id]/cancel

    Request samples

    • cURL
    • C# - RestSharp
    • PHP - HTTP_Request2

    Response samples

    • 200
    • 400
    {
    "id": "60dc27beccbab61bb8d07a7c",
    "merchantId": "YOUR_MERCHANT_ID",
    "status": "CANCELLED",
    "description": "Paying for shoes bought Jan 1st",
    "dueDate": "2022-08-25T22:10:30.000Z",
    "code": "YOUR_PAYMENT_REFERENCE_CODE",
    "productId": "YOUR_PRODUCT_ID",
    "currency": "EUR",
    "language": "ES",
    "amount": 25.55,
    "url": "https://invoice.epgpay.com/U5BR",
    "referenceId": "xxxreference" }
    {
    "errors": [
    {
    "source": {},
    "code": "invoice-service_012",
    "title": "Current invoice status does not allow it to be cancelled"
    }
    ] }
    Tab Content

    Notification

    Get Pay By Link Notification Url

    Get the configured Pay By Link Notification URL where your system receives all the Pay By Link notifications.

    AUTHORIZATIONS: OAuth2 Client Credentials
    HEADER PARAMETERS
    Merchant-Id
    required
    integer
    Example: 10450

    Merchant-Id

    Responses

    200 OK
    RESPONSE SCHEMA: application/json
    notificationUri
    required
    string

    Saved Pay By Link Notification URL

    401 Unauthorized
    403 Forbidden
    500 Internal Server Error
    RESPONSE SCHEMA: application/json
    error
    string

    Http Response message.

    message
    string

    Internal service error message.

    path
    string

    Path where the error has ocurred

    status
    integer

    Http Response code.

    timestamp
    string <date-time>

    Date time when the error has occurred.

    GET/notification

    Request samples

    • cURL
    • C# - RestSharp
    • PHP - HTTP_Request2
    curl --location --request GET 'https://api.easypaymentgateway.com/invoice-service/notification-settings' \
    --header 'Authorization: Bearer YOUR_OATH2_TOKEN'
    var client = new RestClient("https://api.easypaymentgateway.com/invoice-service/notification-settings");
    client.Timeout = -1;
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer YOUR_OATH2_TOKEN");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    <?php
    require_once 'HTTP/Request2.php';
    $request = new HTTP_Request2();
    $request->setUrl('https://api.easypaymentgateway.com/invoice-service/notification-settings');
    $request->setMethod(HTTP_Request2::METHOD_GET);
    $request->setConfig(array(
    'follow_redirects' => TRUE ));
    $request->setHeader(array(
    'Authorization' => 'Bearer YOUR_OATH2_TOKEN' ));
    try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
    echo $response->getBody();
    }
    else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase();
    }
    }
    catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
    }

    Response samples

    • 200
    • 500
    {
    "notificationUri": "https://api-developer.easypaymentgateway.com/webhookinbox/in/pbl/new-url/2"
    }
    {
    "timestamp": "2021-12-27T08:50:42.955+0000",
    "status": 500,
    "error": "Internal Server Error",
    "message": "notificationUri: must not be null",
    "path": "/notification-settings" }

    Save Pay By Link Notification Url

    Save a new Pay By Link Notification URL where is used to notify changes on your Pay By Links.

    Once the notification URL is updated, then all notifications will be posted to the new URL. Even if the PAy By Link has been created before URL has been update.

    AUTHORIZATIONS: OAuth2 Client Credentials
    HEADER PARAMETERS
    Merchant-Id
    required
    integer
    Example: 10450

    Merchant-Id

    REQUEST BODY SCHEMA: application/json

    Pay By Link Notification URL object.

    notificationUri
    required
    string

    Saved Pay By Link Notification URL

    Responses

    200 OK
    RESPONSE SCHEMA: application/json
    notificationUri
    required
    string

    Saved Pay By Link Notification URL

    400 Bad Request
    RESPONSE SCHEMA: application/json
    Array of objects

    List of Errors

    Array ()
    code
    string

    Unique error code

    object
    pointer
    string

    Object or field which produces an error

    title
    string

    Error title

    401 Unauthorized
    403 Forbidden
    POST/notification/{URL}

    Request samples

    • Payload
    • cURL
    • C# - RestSharp
    • PHP - HTTP_Request2
    {
    "notificationUri": "https://api-developer.easypaymentgateway.com/webhookinbox/in/pbl/new-url/2"
    }
    curl --location --request POST 'https://api.easypaymentgateway.com/invoice-service/notification-settings' \
    --header 'Authorization: Bearer YOUR_OATH2_TOKEN' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "notificationUri":"https://api-developer.easypaymentgateway.com/webhookinbox/in/paybylink"
    }'
    var client = new RestClient("https://api.easypaymentgateway.com/invoice-service/notification-settings");
    client.Timeout = -1;
    var request = new RestRequest(Method.POST);
    request.AddHeader("Authorization", "Bearer YOUR_OATH2_TOKEN");
    request.AddHeader("Content-Type", "application/json");
    var body = @"{" + "\n" +
    @" ""notificationUri"":""https://api-developer.easypaymentgateway.com/webhookinbox/in/paybylink""" + "\n" +
    @"}";
    request.AddParameter("application/json", body, ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    <?php
    require_once 'HTTP/Request2.php';
    $request = new HTTP_Request2();
    $request->setUrl('https://api.easypaymentgateway.com/invoice-service/notification-settings');
    $request->setMethod(HTTP_Request2::METHOD_POST);
    $request->setConfig(array( 'follow_redirects' => TRUE ));
    $request->setHeader(array(
    'Authorization' => 'Bearer YOUR_OATH2_TOKEN', 'Content-Type' => 'application/json' ));
    $request->setBody('{\n "notificationUri":"https://api-developer.easypaymentgateway.com/webhookinbox/in/paybylink"\n}');
    try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
    echo $response->getBody();
    }
    else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase();
    }
    }
    catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
    }

    Response samples

    • 200
    • 400
    {
    "notificationUri": "https://api-developer.easypaymentgateway.com/webhookinbox/in/pbl/new-url/2"
    }
    {
    "errors": [
    {
    "code": "NotNull.merchantNotificationConfigurationDto.notificationUri",
    "source": {
    "pointer": "/notificationUri"
    },
    "title": "must not be null"
    }
    ] }

    Example Notification request

    Pay By Link example Notification when the status updates to PAID.

    Notification Retry Policy

    Pay By Link notification system will retry when the Http Status Code response is different than 200. In this case, it will perform new notification attempt followinf bellow retryable policy.

    • Maximum number of attempts: 5
    Attempt Delay in Seconds (from first attempt)
    1st 1s
    2nd 2s
    3rd 4s
    4th 8s
    5th and last 16s
    AUTHORIZATIONS:
    REQUEST BODY SCHEMA: application/json

    Example Pay By Link Notification URL object.

    amount
    required
    number <float>

    Payment’s amount

    country
    required
    string

    Payment’s country in ISO 3166-1 alpha-2.

    List of available countries

    currency
    required
    string 3 characters

    Currency of the transaction in ISO-4217, 3 digit code.

    List of available currencies

    customerId
    required
    string

    The identifier of the customer in your system.

    If you don’t provide a value a random identifier will be assigned. Refer to Auto Generated Customer Id section for more details.

    description
    required
    string

    Invoice’s description

    dueDate
    required
    string <date-time>

    The date when the invoice will expire. It is in ISO-8601 format. After this date the invoice will be marked as EXPIRED see status flow.

    Refer to ISO-8601 format for more details.

    id
    required
    string

    Pay By Link Identifier.

    language
    required
    string
    Default: “EN”
    Enum: “ES” “EN”

    Hosted cashier language

    merchantId
    required
    integer <int64>

    AddonPayments Merchant Identifier.

    Provided by On Boarding process.

    merchantTransactionId
    required
    string <= 45 characters

    Pay By Link’s merchant transaction identifier.

    previousStatus
    required
    string
    Value: “SENT”

    Saved Pay By Link Notification URL

    productId
    required
    integer <int64>

    AddonPayments Product Identifier which is associated the Payment.

    Provided by On Boarding process.

    referenceId
    required
    string [ 4 .. 12 ] characters

    Merchant reference

    status
    required
    string
    Value: “PAID”

    Pay By Link’ status.

    transactionId
    required
    string <= 20 characters

    Payment identifier. Unique per attempt or payment transaction.

    url
    required
    string <url>

    Pay By Link URL, where the customer has to be redirected

    Responses

    200 OK

    POST/notification/merchant-endpoint-notification-url

    Request samples

    • Payload
    • cURL
    {
    "amount": 32.99,
    "merchantTransactionId": "1234abcd567efg",
    "country": "GB",
    "currency": "EUR",
    "customerId": "xx2211223",
    "description": "Paying for shoes bought Jan 1st",
    "dueDate": "2025-01-31T08:00:00.000Z",
    "id": "60dc27beccbab61bb8d07a7c",
    "language": "ES",
    "merchantId": 10450,
    "previousStatus": "https://api-developer.easypaymentgateway.com/webhookinbox/in/pbl/new-url/2",
    "productId": 104500001,
    "status": "PAID",
    "transactionId": 34561321,
    "url": "http://pay-by-link.url/xxxxxxxx",
    "referenceId": "xxxreference" }
    
    curl --location --request POST 'https://api-developer.easypaymentgateway.com/webhookinbox/in/paybylink/merchant-endpoint' \
    --header 'Content-Type: application/json' \
    --data-raw '
    {
    "amount": 32.99,
    "merchantTransactionId": "1234abcdef",
    "country": "GB",
    "currency": "EUR",
    "customerId": "xx2211223",
    "description": "Paying for shoes bought Jan 1st",
    "dueDate": "2025-01-31T08:00:00.000Z",
    "id": "60dc27beccbab61bb8d07a7c",
    "language": "ES",
    "merchantId": 10450,
    "previousStatus": "https://api-developer.easypaymentgateway.com/webhookinbox/in/pbl/new-url/2",
    "productId": 104500001,
    "status": "PAID",
    "transactionId": 34561321,
    "url": "http://pay-by-link.url/xxxxxxxx",
    "referenceId": "xxxreference" }'
    Comparte este documento

    API Explorer

    Copiar el enlace

    Icono del portapapeles
    Tabla de Contenidos

    Products

    • Cyberpac
    • Addon Payments
    • POS integrated Payments
    • Universal Pay

    Sales

    Tell us about your business so we can offer you the best solution.

    Contact an expert
    Contact an expert
    Contact an expert
    Contact an expert
    Contact an expert

    Technical Support

    Already a client and need help? Contact us, we’re here for you.

    Help

    Partners

    We work with the best partners for in-store and ecommerce solutions. Want to join us?

    Join us

    © Comercia Global Payments

    Privacy policy
    Exercising rights
    Client information
    Whistleblowing channel
    Legal disclaimer
    Cookies policy
    Ask AI
    Write your question. For example: How do I create a payment link?
    SmartWiki may skip data. Verify the information or contact support.

    SmartWiki, Powered by AI

    API - Developers Docs
    Manage cookie consent

    To offer the best experiences, we use technologies such as cookies to store and/or access device information. Consent to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Failure to consent, or withdrawal of consent, may adversely affect certain features and functions.

    Functional Always active
    Storage or technical access is strictly necessary for the legitimate purpose of allowing the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
    Preferences
    Technical storage or access is necessary for the legitimate purpose of storing preferences not requested by the subscriber or user.
    Statistics
    El almacenamiento o acceso técnico que es utilizado exclusivamente con fines estadísticos. Storage or technical access that is used exclusively for anonymous statistical purposes. Without a requirement, voluntary compliance by your Internet service provider, or additional records from a third party, information stored or retrieved solely for this purpose cannot be used to identify you.
    Marketing
    Storage or technical access is necessary to create user profiles to send advertising, or to track the user on a website or several websites for similar marketing purposes.
    Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
    See preferences
    {title} {title} {title}

    Consulta la documentación de las distintas secciones de integraciones:

    Comienza a integrar

    undraw_add_to_cart_re_wrdo 1 (1) (1)

    Plugins para CMS

    Complementa la integración

    SDKs

    Métodos de pago

    Herramientas

    Addon Payments

    Consulta la documentación de Addon Payments. Aquí tienes las distintas secciones:

    Integraciones

    Consultas frecuentes

    Portal Backoffice

    Cyberpac

    We are currently working on the English version of the Cyberpac documentation. You can view the Spanish version using the buttons below:

    Canales BackOffice Portal

    Plugins integration

    Custom integrations

    POS integrated Payments

    Create a solution that will help you automate processes. You can even add payment processes on physical terminals.

    Payment Integrated with Android POS

    Payment Integrated with Smartphone POS

    POS Data sheets

    Addon Payments

    Comercia Global Payments has several integration options so you can choose the most efficient one for you.

    Integrations

    Frequently Asked Questions

    BackOffice Portal

    Consult the documentation of the different integrations sections:​

    Start integration

    undraw_add_to_cart_re_wrdo 1 (1) (1)

    CMS Plugins

    Complement your integration

    SDKs

    Payment Methods

    Tools