Vault

How to use Vault to submit a payin in Malaysia.

Create Vault

POST https://gateway-test.pagsmile.com/vault/create

This endpoint allows you to create a vault.

Headers

NameTypeDescription

Content-Type*

string

application/json; chartset=UTF-8

Authorization*

string

Basic Base($app_id:$security_key)

Request Body

NameTypeDescription

app_id*

string

created app's id at dashboard

- Max. 32 chars -

timestamp*

string

yyyy-MM-dd HH:mm:ss - Max. 19 chars -

version*

string

Fixed value: 2.0

type*

string

Fixed value: wallet_account

wallet_account.region*

string

MYS for Malaysia

wallet_account.method*

string

Wallet

wallet_account.channel*

string

TNG

wallet_account.uid*

string

Unique ID in merchant system

wallet_account.device_type*

string

WEB or WAP

wallet_account.return_url*

string

{
    "code": "10000",
    "msg": "Success",
    "auth_url": "https://demo.auth.url/",
    "token": "wa_***",
    "type": ""wallet_account",
    "timestamp": "yyyy-MM-dd HH:mm:ss",
    "checkout_url": "https://demo.checkout.url"
}

Example

curl --location --request POST 'https://gateway-test.pagsmile.com/trade/pay' \
--header 'Authorization: Basic MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "app_id": "162************38",,
    "timestamp": "2022-01-01 03:54:01",
    "version": "2.0",
    "type": "wallet_account",
    "wallet_account": {
        "region": "MYS",
        "method": "Wallet",
        "channel": "TNG",
        "uid": "123",
        "device_type": "WEB",
        "return_url": "https://demo.return.url"
    }
}'

Refresh Vault

POST https://gateway-test.pagsmile.com/vault/refresh

This endpoint allows you to refresh a vault.

Headers

NameTypeDescription

Content-Type*

string

application/json; chartset=UTF-8

Authorization*

string

Basic Base($app_id:$security_key)

Request Body

NameTypeDescription

app_id*

string

created app's id at dashboard

- Max. 32 chars -

timestamp*

string

yyyy-MM-dd HH:mm:ss - Max. 19 chars -

version*

string

Fixed value: 2.0

type*

string

Fixed value: wallet_account

vault_token*

string

{
    "code": "10000",
    "msg": "Success",
    "token": "wa_***",
    "type": ""wallet_account",
    "timestamp": "yyyy-MM-dd HH:mm:ss"
}

Void Vault

POST https://gateway-test.pagsmile.com/vault/void

This endpoint allows you to void a vault.

Headers

NameTypeDescription

Content-Type*

string

application/json; chartset=UTF-8

Authorization*

string

Basic Base($app_id:$security_key)

Request Body

NameTypeDescription

app_id*

string

created app's id at dashboard

- Max. 32 chars -

timestamp*

string

yyyy-MM-dd HH:mm:ss - Max. 19 chars -

version*

string

Fixed value: 2.0

type*

string

Fixed value: wallet_account

vault_token*

string

{
    "code": "10000",
    "msg": "Success",
    "token": "wa_***",
    "type": ""wallet_account",
    "timestamp": "yyyy-MM-dd HH:mm:ss"
}

Note: 162************38 is pagsmile's test app id for sandbox, and MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ== is authorization token associated with the test app id.

Please use your own app_id and generate your own authorization token when testing.

Last updated