PayStar API Documentation
  1. Merchant EN
  • Merchant EN
    • Introduction
    • Glossary
    • Authorization key
    • Sandbox
    • Additional fields
    • Currencies
    • Bank names
    • Telecom operators
    • Callbacks
    • Error descriptions
    • Tech FAQ
    • Order History
    • Integratins
      • Stripe
      • Inwizo
      • 2Checkout
      • Adyen
      • AffiniPay
      • Alikassa
      • AlliancePay
      • Amazon Pay
      • AnyMoney
      • AstroPay
      • Aureavia
      • AurisMyChanger
      • Authorize.Net
      • Avatarix
    • Balance H2H
      GET
    • Deposit H2H - Card & P2P
      POST
    • Deposit H2H - Token
      POST
    • Deposit H2C - Card
      POST
    • Deposit status H2H - PayStar ID
      GET
    • Deposit status H2H - Merch ID
      GET
    • Payout H2H
      POST
    • Payout status H2H - PayStar ID
      GET
    • Payout status H2H - Merch ID
      GET
  1. Merchant EN

Deposit H2H - Token

POST
https://token.PayStar.uk/api/v1/integration/deposit-order/
Last modified:2025-04-29 19:15:36
INFO
This method is used to perform recurring payments after you have obtained the card token. It does not require a PCI DSS certificate.
Thanks to the tokenization of bank cards, you can simplify the payment process for end users. Here's how it works:

Storing Card Data as a Token:#

After the first successful payment, we can store your user's card data as a token and provide it to you in the checking payment status request or callbacks.
Response example:
{
    "externalId": "a64104f5-58ff-4c8f-b704-fa28f2d0cf57",
    "orderStatus": "Processing",
    "externalParams": {
        "cardToken": null,
        "cardStorageToken": "7b9fdcbe-10cb-4e06-b8d1-25c4b1cbb081",
        "cardHolder": "JOHN WEAK",
        "cardNumber": "123412******1234"
    }
}

Associating the Token with the User:#

You need to save this token and link it to the corresponding user. For subsequent payment initiations, you will need to specify this token in the current payment method/
Request example:
  "amount": 1000,
  "currency": "EUR",
  "externalTransactionId":  "MerchantPaymentId-12345",
  "successRedirectUrl": "http://merch.com/success",
  "failedRedirectUrl": "http://merch.com/failed",
  "processingRedirectUrl": "http://merch.com/processing",
  "additionalFields": [
    {
      "key": "cardStorageToken",
      "value": "7b9fdcbe-10cb-4e06-b8d1-25c4b1cbb081"
    }
  ]
}'

Simplified User Input:#

This allows the user to enter only the CVV code on the payment page; other card details will be retrieved from the token.
CardTokenization.png

To make deposit payment please use follow sections:#

Create payment (current method): POST token.PayStar.uk/api/v1/integration/deposit-order/
Get status: GET secure.PayStar.uk/api/v1/integration/deposit-order/{externalId}/status
Get status by Callback

Create H2H Deposit with the banking card - Sequence diagram#

Glossary: User | Merchant | PayStar.uk | ACS | Order | 3DS URL | Callback

CURL Example | POST Deposit order#

curl --request POST \
 --url https://token.PayStar.uk/api/v1/integration/deposit-order\
 --header 'Authorization: Bearer YOUR TOKEN' \ 
 --header 'Content-Type: application/json' \
 --header 'accept: text/plain' \
 --data '{
  "amount": 100,
  "currency": "USD",
  "externalTransactionId": "MerchantPaymentId-12345",
  "successRedirectUrl": "http://merch.com/success",
  "failedRedirectUrl": "http://merch.com/failed", 
  "processingRedirectUrl": "http://merch.com/processing", 
  "additionalFields": [ 
    {
      "key": "cardStorageToken",
      "value": "7b9fdcbe-10cb-4e06-b8d1-25c4b1cbb081" 
    }
  ]
}'

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "amount": 100,
    "currency": "USD",
    "externalTransactionId": "MerchID-{{$number.int(min=1)}}",
    "callbackUrl": "https://merch.com/callbackUrl",
    "processingRedirectUrl": "https://merch.com/processing",
    "failedRedirectUrl": "https://merch.com/failed",
    "successRedirectUrl": "https://merch.com/success",
    "additionalFields": [
        {
            "key": "cardStorageToken",
            "value": "7b9fdcbe-10cb-4e06-b8d1-25c4b1cbb081"
        },
        {
            "key": "payeerIdentifier",
            "value": "Merch-12345"
        },
        {
            "key": "email",
            "value": "Jhon.Wick@Continental-Hotel.com"
        }
    ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://token.PayStar.uk/api/v1/integration/deposit-order/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 100,
    "currency": "USD",
    "externalTransactionId": "MerchID-{{$number.int(min=1)}}",
    "callbackUrl": "https://merch.com/callbackUrl",
    "processingRedirectUrl": "https://merch.com/processing",
    "failedRedirectUrl": "https://merch.com/failed",
    "successRedirectUrl": "https://merch.com/success",
    "additionalFields": [
        {
            "key": "cardStorageToken",
            "value": "7b9fdcbe-10cb-4e06-b8d1-25c4b1cbb081"
        },
        {
            "key": "payeerIdentifier",
            "value": "Merch-12345"
        },
        {
            "key": "email",
            "value": "Jhon.Wick@Continental-Hotel.com"
        }
    ]
}'

Responses

🟢200Success
application/json
Body

Example
{
    "externalId": "390bb1fb-b837-4480-8302-e39f13b63281",
    "orderStatus": "Processing",
    "paymentDetails": {
        "formUrl": "https://3ds.PayStar.uk?t=ae8b8a5a-f65f-4bb8-97c6-5916d9d02ac4"
    }
}
🟠400Validation error
🟠400Validation error - token
🟠400Payment already exist
🟠400Limit was reached
🟠401Unauthorized
🟠403Forbidden - Endpoint
🟠403Forbidden - IP address
🟠423Temporary error
🔴500Internal Server Error
Modified at 2025-04-29 19:15:36
Previous
Deposit H2H - Card & P2P
Next
Deposit H2C - Card
Built with