---
title: Approve Payout
slug: nicepay-api-snap-testing-approve-payout
description: Informasi tentang cara uji coba API SNAP - Approve Payout yang disediakan oleh NICEPAY

image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/GEkpnG1JdIntDNhiBGXDA_rdrx9d8diaz-pgm07xfz2-test.png
docTags: 
createdAt: 2024-05-06T08:01:05.985Z
---

{
  "id": "M7Bjb1hpzwp2WWf3nCLC-",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://dev.nicepay.co.id/nicepay/api/v1.0/transfer/approve",
    "servers": [
      {
        "url": "https://dev.nicepay.co.id/nicepay/api/v1.0/transfer/approve"
      },
      {
        "url": "https://staging.nicepay.co.id/nicepay/api/v1.0/transfer/approve"
      },
      {
        "url": "https://www.nicepay.co.id/nicepay/api/v1.0/transfer/approve"
      }
    ],
    "name": "Approve Payout",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "kind": "required",
          "name": "X-TIMESTAMP",
          "type": "string",
          "example": "2022-08-28T10:11:40+07:00"
        },
        {
          "kind": "required",
          "name": "X-SIGNATURE",
          "type": "string",
          "default": "dxmAqlk/feHhVDFfYOkDW5p7VbpPEgTzFNggwNsOY5Ukbqvf6OjWkfEKi6pQ8WrO60aHS2a7aZk0EsZ+bmREYw=="
        },
        {
          "kind": "required",
          "name": "X-PARTNER-ID",
          "type": "string",
          "example": "IONPAYTEST"
        },
        {
          "kind": "required",
          "name": "X-EXTERNAL-ID",
          "type": "string",
          "example": "2023082823595901"
        },
        {
          "kind": "required",
          "name": "CHANNEL-ID",
          "type": "string",
          "example": "IONPAYTEST"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "example": "{\"originalReferenceNo\":\"IONPAYTEST07202308301826504375\",\"merchantId\":\"IONPAYTEST\",\"originalPartnerReferenceNo\":\"ref-998294194\"}",
          "description": "",
          "customType": "approve_payout_body",
          "schema": [
            {
              "name": "originalPartnerReferenceNo",
              "kind": "required",
              "type": "string",
              "description": "Original transaction identifier on consumer system",
              "example": ""
            },
            {
              "name": "originalReferenceNo",
              "kind": "required",
              "type": "string",
              "description": "Original transaction identifier on service provider system",
              "example": ""
            },
            {
              "name": "merchantId",
              "kind": "required",
              "type": "string",
              "description": "Merchant identifier that is unique pereach merchant",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/approve_payout_body",
          "complexItems": [
            {
              "name": "object",
              "schema": [
                {
                  "name": "originalPartnerReferenceNo",
                  "kind": "required",
                  "type": "string",
                  "description": "Original transaction identifier on consumer system",
                  "example": ""
                },
                {
                  "name": "originalReferenceNo",
                  "kind": "required",
                  "type": "string",
                  "description": "Original transaction identifier on service provider system",
                  "example": ""
                },
                {
                  "name": "merchantId",
                  "kind": "required",
                  "type": "string",
                  "description": "Merchant identifier that is unique pereach merchant",
                  "example": ""
                }
              ],
              "modelRef": "#/components/schemas/Approve-Payout",
              "customType": "Approve-Payout"
            },
            {
              "name": "object",
              "schema": []
            }
          ],
          "complexType": "allOf",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Authorization",
          "name": "Authorization",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "GENERATED",
            "code": "// Successful\n{\n  \"responseCode\": \"2000000\",\n  \"responseMessage\": \"Successful\",\n  \"originalPartnerReferenceNo\": \"ref-998294194\",\n  \"originalReferenceNo\": \"IONPAYTEST07202308301826504375\",\n  \"beneficiaryAccountNo\": \"903327200\",\n  \"beneficiaryName\": \"Test\",\n  \"beneficiaryBankCode\": \"BBBA\",\n  \"amount\": {\n    \"currency\": \"IDR\",\n    \"value\": \"10000.00\"\n  },\n  \"transactionStatus\": \"03\"\n}"
          },
          {
            "label": "Successful",
            "code": "{\n  \"responseCode\": \"2000000\",\n  \"responseMessage\": \"Successful\",\n  \"originalPartnerReferenceNo\": \"ref-998294194\",\n  \"originalReferenceNo\": \"IONPAYTEST07202308301826504375\",\n  \"beneficiaryAccountNo\": \"903327200\",\n  \"beneficiaryName\": \"Test\",\n  \"beneficiaryBankCode\": \"BBBA\",\n  \"amount\": {\n    \"value\": \"10000.00\",\n    \"currency\": \"IDR\"\n  },\n  \"transactionStatus\": \"03\"\n}"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "SuccessfulApprovePayout",
            "schema": [
              {
                "name": "responseCode",
                "kind": "optional",
                "type": "string",
                "description": "Response Code",
                "example": "2000000"
              },
              {
                "name": "responseMessage",
                "kind": "optional",
                "type": "string",
                "description": "Response Message",
                "example": "Successful"
              },
              {
                "name": "originalPartnerReferenceNo",
                "kind": "optional",
                "type": "string",
                "description": "Original Partner ReferenceNo",
                "example": "ref-998294194"
              },
              {
                "name": "originalReferenceNo",
                "kind": "optional",
                "type": "string",
                "description": "Original ReferenceNo",
                "example": "IONPAYTEST07202308301826504375"
              },
              {
                "name": "beneficiaryAccountNo",
                "kind": "optional",
                "type": "string",
                "description": "Beneficiary AccountNo",
                "example": "903327200"
              },
              {
                "name": "beneficiaryName",
                "kind": "optional",
                "type": "string",
                "description": "Beneficiary Name",
                "example": "Test"
              },
              {
                "name": "beneficiaryBankCode",
                "kind": "optional",
                "type": "string",
                "description": "Beneficiary BankCode",
                "example": "BBBA"
              },
              {
                "name": "amount",
                "kind": "optional",
                "type": "object",
                "modelRef": "#/components/schemas/amount",
                "customType": "amount",
                "schema": [
                  {
                    "name": "currency",
                    "kind": "optional",
                    "type": "string",
                    "description": "Currency",
                    "example": "IDR"
                  },
                  {
                    "name": "value",
                    "kind": "optional",
                    "type": "string",
                    "description": "Value",
                    "example": "10000.00"
                  }
                ]
              },
              {
                "name": "transactionStatus",
                "kind": "optional",
                "type": "string",
                "description": "Transaction Status",
                "example": "03"
              }
            ],
            "modelRef": "#/components/schemas/SuccessfulApprovePayout",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "202",
        "description": "Request In Progress",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "GENERATED",
            "code": "// Request In Progress\n{\n  \"responseCode\": \"202XX00\",\n  \"responseMessage\": \"Request In Progress\"\n}"
          },
          {
            "label": "Request In Progress",
            "code": "{\n  \"responseCode\": \"202XX00\",\n  \"responseMessage\": \"Request In Progress\"\n}"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "RequestInProgress",
            "schema": [
              {
                "name": "responseCode",
                "kind": "optional",
                "type": "string",
                "description": "Response Code",
                "example": "202XX00"
              },
              {
                "name": "responseMessage",
                "kind": "optional",
                "type": "string",
                "description": "Response Message",
                "example": "Request In Progress"
              }
            ],
            "modelRef": "#/components/schemas/RequestInProgress",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "409",
        "description": "Duplicate partnerReferenceNo",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "GENERATED",
            "code": "// Duplicate partnerReferenceNo\n{\n  \"responseCode\": \"409XX01\",\n  \"responseMessage\": \"Duplicate partnerReferenceNo\"\n}"
          },
          {
            "label": "Duplicate partnerReferenceNo",
            "code": "{\n  \"responseCode\": \"409XX01\",\n  \"responseMessage\": \"Duplicate partnerReferenceNo\"\n}"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "DuplicatePartnerReferenceNo",
            "schema": [
              {
                "name": "responseCode",
                "kind": "optional",
                "type": "string",
                "description": "Response Code",
                "example": "409XX01"
              },
              {
                "name": "responseMessage",
                "kind": "optional",
                "type": "string",
                "description": "Response Message",
                "example": "Duplicate partnerReferenceNo"
              }
            ],
            "modelRef": "#/components/schemas/DuplicatePartnerReferenceNo",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "General Error",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "GENERATED",
            "code": "// General Error\n{\n  \"responseCode\": \"500XX00\",\n  \"responseMessage\": \"General Error\"\n}"
          },
          {
            "label": "General Error",
            "code": "{\n  \"responseCode\": \"500XX00\",\n  \"responseMessage\": \"General Error\"\n}"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "GeneralError",
            "schema": [
              {
                "name": "responseCode",
                "kind": "optional",
                "type": "string",
                "description": "Response Code",
                "example": "500XX00"
              },
              {
                "name": "responseMessage",
                "kind": "optional",
                "type": "string",
                "description": "Response Message",
                "example": "General Error"
              }
            ],
            "modelRef": "#/components/schemas/GeneralError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "504",
        "description": "Request Timeout",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "GENERATED",
            "code": "// Request Timeout\n{\n  \"responseCode\": \"504XX00\",\n  \"responseMessage\": \"Request Timeout\"\n}"
          },
          {
            "label": "Request Timeout",
            "code": "{\n  \"responseCode\": \"504XX00\",\n  \"responseMessage\": \"Request Timeout\"\n}"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "RequestTimeout",
            "schema": [
              {
                "name": "responseCode",
                "kind": "optional",
                "type": "string",
                "description": "Response Code",
                "example": "504XX00"
              },
              {
                "name": "responseMessage",
                "kind": "optional",
                "type": "string",
                "description": "Response Message",
                "example": "Request Timeout"
              }
            ],
            "modelRef": "#/components/schemas/RequestTimeout",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "V2yFriN5IjK0_yaBLaNst",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://dev.nicepay.co.id/nicepay/api/v1.0/transfer/approve \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-timestamp: 2022-08-28T10:11:40+07:00' \\\n     --header 'x-signature: dxmAqlk/feHhVDFfYOkDW5p7VbpPEgTzFNggwNsOY5Ukbqvf6OjWkfEKi6pQ8WrO60aHS2a7aZk0EsZ+bmREYw==' \\\n     --header 'x-partner-id: IONPAYTEST' \\\n     --header 'x-external-id: 2023082823595901' \\\n     --header 'channel-id: IONPAYTEST' \\\n     --data '{\n     \"originalPartnerReferenceNo\": \"\",\n     \"originalReferenceNo\": \"\",\n     \"merchantId\": \"\"\n     }'"
        },
        {
          "id": "zGOkkv0AtWHqoBsK1-IVE",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-timestamp\", \"2022-08-28T10:11:40+07:00\");\nmyHeaders.append(\"x-signature\", \"dxmAqlk/feHhVDFfYOkDW5p7VbpPEgTzFNggwNsOY5Ukbqvf6OjWkfEKi6pQ8WrO60aHS2a7aZk0EsZ+bmREYw==\");\nmyHeaders.append(\"x-partner-id\", \"IONPAYTEST\");\nmyHeaders.append(\"x-external-id\", \"2023082823595901\");\nmyHeaders.append(\"channel-id\", \"IONPAYTEST\");\n\nvar raw = JSON.stringify({\n   \"originalPartnerReferenceNo\": \"\",\n   \"originalReferenceNo\": \"\",\n   \"merchantId\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://dev.nicepay.co.id/nicepay/api/v1.0/transfer/approve\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Ca5X-rb3M-ZnIdNNYHsVt",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://dev.nicepay.co.id/nicepay/api/v1.0/transfer/approve\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-timestamp\"] = \"2022-08-28T10:11:40+07:00\"\nrequest[\"x-signature\"] = \"dxmAqlk/feHhVDFfYOkDW5p7VbpPEgTzFNggwNsOY5Ukbqvf6OjWkfEKi6pQ8WrO60aHS2a7aZk0EsZ+bmREYw==\"\nrequest[\"x-partner-id\"] = \"IONPAYTEST\"\nrequest[\"x-external-id\"] = \"2023082823595901\"\nrequest[\"channel-id\"] = \"IONPAYTEST\"\nrequest.body = JSON.dump({\n   \"originalPartnerReferenceNo\": \"\",\n   \"originalReferenceNo\": \"\",\n   \"merchantId\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "QvgTUOIMxIdML_C8dP6rK",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://dev.nicepay.co.id/nicepay/api/v1.0/transfer/approve\"\n\npayload = json.dumps({\n   \"originalPartnerReferenceNo\": \"\",\n   \"originalReferenceNo\": \"\",\n   \"merchantId\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-timestamp': '2022-08-28T10:11:40+07:00',\n   'x-signature': 'dxmAqlk/feHhVDFfYOkDW5p7VbpPEgTzFNggwNsOY5Ukbqvf6OjWkfEKi6pQ8WrO60aHS2a7aZk0EsZ+bmREYw==',\n   'x-partner-id': 'IONPAYTEST',\n   'x-external-id': '2023082823595901',\n   'channel-id': 'IONPAYTEST'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "V2yFriN5IjK0_yaBLaNst"
    },
    "results": {
      "languages": [
        {
          "id": "3fsvPTX9aHsfB3W9uo8w7",
          "language": "200",
          "code": "// Successful\n{\n  \"responseCode\": \"2000000\",\n  \"responseMessage\": \"Successful\",\n  \"originalPartnerReferenceNo\": \"ref-998294194\",\n  \"originalReferenceNo\": \"IONPAYTEST07202308301826504375\",\n  \"beneficiaryAccountNo\": \"903327200\",\n  \"beneficiaryName\": \"Test\",\n  \"beneficiaryBankCode\": \"BBBA\",\n  \"amount\": {\n    \"currency\": \"IDR\",\n    \"value\": \"10000.00\"\n  },\n  \"transactionStatus\": \"03\"\n}",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// Successful\n{\n  \"responseCode\": \"2000000\",\n  \"responseMessage\": \"Successful\",\n  \"originalPartnerReferenceNo\": \"ref-998294194\",\n  \"originalReferenceNo\": \"IONPAYTEST07202308301826504375\",\n  \"beneficiaryAccountNo\": \"903327200\",\n  \"beneficiaryName\": \"Test\",\n  \"beneficiaryBankCode\": \"BBBA\",\n  \"amount\": {\n    \"currency\": \"IDR\",\n    \"value\": \"10000.00\"\n  },\n  \"transactionStatus\": \"03\"\n}"
            },
            {
              "label": "Successful",
              "code": "{\n  \"responseCode\": \"2000000\",\n  \"responseMessage\": \"Successful\",\n  \"originalPartnerReferenceNo\": \"ref-998294194\",\n  \"originalReferenceNo\": \"IONPAYTEST07202308301826504375\",\n  \"beneficiaryAccountNo\": \"903327200\",\n  \"beneficiaryName\": \"Test\",\n  \"beneficiaryBankCode\": \"BBBA\",\n  \"amount\": {\n    \"value\": \"10000.00\",\n    \"currency\": \"IDR\"\n  },\n  \"transactionStatus\": \"03\"\n}"
            }
          ]
        },
        {
          "id": "YS3au4zEsXU2IZRERdq30",
          "language": "202",
          "code": "// Request In Progress\n{\n  \"responseCode\": \"202XX00\",\n  \"responseMessage\": \"Request In Progress\"\n}",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// Request In Progress\n{\n  \"responseCode\": \"202XX00\",\n  \"responseMessage\": \"Request In Progress\"\n}"
            },
            {
              "label": "Request In Progress",
              "code": "{\n  \"responseCode\": \"202XX00\",\n  \"responseMessage\": \"Request In Progress\"\n}"
            }
          ]
        },
        {
          "id": "BEqfmYElAcmVbZVECKZzO",
          "language": "409",
          "code": "// Duplicate partnerReferenceNo\n{\n  \"responseCode\": \"409XX01\",\n  \"responseMessage\": \"Duplicate partnerReferenceNo\"\n}",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// Duplicate partnerReferenceNo\n{\n  \"responseCode\": \"409XX01\",\n  \"responseMessage\": \"Duplicate partnerReferenceNo\"\n}"
            },
            {
              "label": "Duplicate partnerReferenceNo",
              "code": "{\n  \"responseCode\": \"409XX01\",\n  \"responseMessage\": \"Duplicate partnerReferenceNo\"\n}"
            }
          ]
        },
        {
          "id": "ZqTubdrQ9s2VIh3Pf9IVa",
          "language": "500",
          "code": "// General Error\n{\n  \"responseCode\": \"500XX00\",\n  \"responseMessage\": \"General Error\"\n}",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// General Error\n{\n  \"responseCode\": \"500XX00\",\n  \"responseMessage\": \"General Error\"\n}"
            },
            {
              "label": "General Error",
              "code": "{\n  \"responseCode\": \"500XX00\",\n  \"responseMessage\": \"General Error\"\n}"
            }
          ]
        },
        {
          "id": "hAimG3ostEAKP6dX3YUOP",
          "language": "504",
          "code": "// Request Timeout\n{\n  \"responseCode\": \"504XX00\",\n  \"responseMessage\": \"Request Timeout\"\n}",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// Request Timeout\n{\n  \"responseCode\": \"504XX00\",\n  \"responseMessage\": \"Request Timeout\"\n}"
            },
            {
              "label": "Request Timeout",
              "code": "{\n  \"responseCode\": \"504XX00\",\n  \"responseMessage\": \"Request Timeout\"\n}"
            }
          ]
        }
      ],
      "selectedLanguageId": "3fsvPTX9aHsfB3W9uo8w7"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}