Skip to main content
POST
/
v3
/
payin
/
{id}
/
confirm
Confirm a payin
curl --request POST \
  --url https://service-sandbox.tazapay.com/v3/payin/{id}/confirm \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_details": {
    "name": "<string>",
    "email": "<string>",
    "country": "<string>",
    "phone": {
      "calling_code": "<string>",
      "number": "<string>"
    }
  },
  "success_url": "<string>",
  "cancel_url": "<string>",
  "payment_method_details": {
    "type": "<string>"
  },
  "session_id": "<string>",
  "customer": "<string>",
  "shipping_details": {
    "name": "<string>",
    "address": {
      "line1": "<string>",
      "line2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "country": "<string>",
      "postal_code": "<string>"
    },
    "phone": {
      "calling_code": "<string>",
      "number": "<string>"
    },
    "label": "<string>"
  },
  "billing_details": {
    "name": "<string>",
    "address": {
      "line1": "<string>",
      "line2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "country": "<string>",
      "postal_code": "<string>"
    },
    "phone": {
      "calling_code": "<string>",
      "number": "<string>"
    },
    "label": "<string>"
  },
  "transaction_documents": "<string>",
  "metadata": "{\"key1\": \"value1\", \"key2\": \"value2\"}",
  "reference_id": "<string>",
  "statement_descriptor": "<string>"
}
'
import requests

url = "https://service-sandbox.tazapay.com/v3/payin/{id}/confirm"

payload = {
"customer_details": {
"name": "<string>",
"email": "<string>",
"country": "<string>",
"phone": {
"calling_code": "<string>",
"number": "<string>"
}
},
"success_url": "<string>",
"cancel_url": "<string>",
"payment_method_details": { "type": "<string>" },
"session_id": "<string>",
"customer": "<string>",
"shipping_details": {
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"postal_code": "<string>"
},
"phone": {
"calling_code": "<string>",
"number": "<string>"
},
"label": "<string>"
},
"billing_details": {
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"postal_code": "<string>"
},
"phone": {
"calling_code": "<string>",
"number": "<string>"
},
"label": "<string>"
},
"transaction_documents": "<string>",
"metadata": "{\"key1\": \"value1\", \"key2\": \"value2\"}",
"reference_id": "<string>",
"statement_descriptor": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_details: {
name: '<string>',
email: '<string>',
country: '<string>',
phone: {calling_code: '<string>', number: '<string>'}
},
success_url: '<string>',
cancel_url: '<string>',
payment_method_details: {type: '<string>'},
session_id: '<string>',
customer: '<string>',
shipping_details: {
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
postal_code: '<string>'
},
phone: {calling_code: '<string>', number: '<string>'},
label: '<string>'
},
billing_details: {
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
postal_code: '<string>'
},
phone: {calling_code: '<string>', number: '<string>'},
label: '<string>'
},
transaction_documents: '<string>',
metadata: '{"key1": "value1", "key2": "value2"}',
reference_id: '<string>',
statement_descriptor: '<string>'
})
};

fetch('https://service-sandbox.tazapay.com/v3/payin/{id}/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://service-sandbox.tazapay.com/v3/payin/{id}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_details' => [
'name' => '<string>',
'email' => '<string>',
'country' => '<string>',
'phone' => [
'calling_code' => '<string>',
'number' => '<string>'
]
],
'success_url' => '<string>',
'cancel_url' => '<string>',
'payment_method_details' => [
'type' => '<string>'
],
'session_id' => '<string>',
'customer' => '<string>',
'shipping_details' => [
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'postal_code' => '<string>'
],
'phone' => [
'calling_code' => '<string>',
'number' => '<string>'
],
'label' => '<string>'
],
'billing_details' => [
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'postal_code' => '<string>'
],
'phone' => [
'calling_code' => '<string>',
'number' => '<string>'
],
'label' => '<string>'
],
'transaction_documents' => '<string>',
'metadata' => '{"key1": "value1", "key2": "value2"}',
'reference_id' => '<string>',
'statement_descriptor' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://service-sandbox.tazapay.com/v3/payin/{id}/confirm"

payload := strings.NewReader("{\n \"customer_details\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": {\n \"calling_code\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"success_url\": \"<string>\",\n \"cancel_url\": \"<string>\",\n \"payment_method_details\": {\n \"type\": \"<string>\"\n },\n \"session_id\": \"<string>\",\n \"customer\": \"<string>\",\n \"shipping_details\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"phone\": {\n \"calling_code\": \"<string>\",\n \"number\": \"<string>\"\n },\n \"label\": \"<string>\"\n },\n \"billing_details\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"phone\": {\n \"calling_code\": \"<string>\",\n \"number\": \"<string>\"\n },\n \"label\": \"<string>\"\n },\n \"transaction_documents\": \"<string>\",\n \"metadata\": \"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\"}\",\n \"reference_id\": \"<string>\",\n \"statement_descriptor\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://service-sandbox.tazapay.com/v3/payin/{id}/confirm")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"customer_details\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": {\n \"calling_code\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"success_url\": \"<string>\",\n \"cancel_url\": \"<string>\",\n \"payment_method_details\": {\n \"type\": \"<string>\"\n },\n \"session_id\": \"<string>\",\n \"customer\": \"<string>\",\n \"shipping_details\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"phone\": {\n \"calling_code\": \"<string>\",\n \"number\": \"<string>\"\n },\n \"label\": \"<string>\"\n },\n \"billing_details\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"phone\": {\n \"calling_code\": \"<string>\",\n \"number\": \"<string>\"\n },\n \"label\": \"<string>\"\n },\n \"transaction_documents\": \"<string>\",\n \"metadata\": \"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\"}\",\n \"reference_id\": \"<string>\",\n \"statement_descriptor\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://service-sandbox.tazapay.com/v3/payin/{id}/confirm")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_details\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"country\": \"<string>\",\n \"phone\": {\n \"calling_code\": \"<string>\",\n \"number\": \"<string>\"\n }\n },\n \"success_url\": \"<string>\",\n \"cancel_url\": \"<string>\",\n \"payment_method_details\": {\n \"type\": \"<string>\"\n },\n \"session_id\": \"<string>\",\n \"customer\": \"<string>\",\n \"shipping_details\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"phone\": {\n \"calling_code\": \"<string>\",\n \"number\": \"<string>\"\n },\n \"label\": \"<string>\"\n },\n \"billing_details\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\"\n },\n \"phone\": {\n \"calling_code\": \"<string>\",\n \"number\": \"<string>\"\n },\n \"label\": \"<string>\"\n },\n \"transaction_documents\": \"<string>\",\n \"metadata\": \"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\"}\",\n \"reference_id\": \"<string>\",\n \"statement_descriptor\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "message": "",
  "data": {
    "amount": 10000,
    "amount_paid": 0,
    "billing_details": {
      "address": {
        "city": "Singapore",
        "country": "SG",
        "line1": "1st Street",
        "line2": "2nd Avenue",
        "postal_code": "43004",
        "state": "Singapore"
      },
      "label": "Home",
      "name": "Andrea Lark",
      "phone": {
        "calling_code": "65",
        "number": "87654321"
      }
    },
    "cancel_url": "https://mystore.com/try_again",
    "cancelled_at": null,
    "client_token": "XAHf7IAsGkG64BlyjA6rwNDuKXfaWaH9nGshKkT0E-E=",
    "confirm": true,
    "created_at": "2025-09-15T12:51:42.580016Z",
    "customer": "cus_d33vk9b1dta392s01fa0",
    "customer_details": {
      "country": "SG",
      "email": "andrea.lark@me.com",
      "name": "Andrea Lark",
      "phone": {
        "calling_code": "65",
        "number": "87654321"
      }
    },
    "form": "",
    "holding_currency": "SGD",
    "id": "pay_d340nnjk1kl59dv26bqg",
    "invoice_currency": "SGD",
    "items": [],
    "latest_payment_attempt": "pat_d340nurk1kl59dv26cfg",
    "latest_payment_attempt_data": {
      "expires_at": "2025-09-15T12:54:11Z",
      "qr_code": "YXNkMWZZVDM5UmdhVGF6YXBheWpza2d1MTNUUkZEMTIzNGFoc2dkakZHSDk5ODczSEdKSFNKS2Fzc3NpdWd1"
    },
    "metadata": null,
    "object": "payin",
    "paid_in_excess": false,
    "partially_paid": false,
    "payment_attempts": [],
    "payment_method_details": {
      "type": "paynow_sgd"
    },
    "redirect_url": "",
    "reference_id": "",
    "shipping_details": {
      "address": {
        "city": "Singapore",
        "country": "SG",
        "line1": "1st Street",
        "line2": "2nd Avenue",
        "postal_code": "43004",
        "state": "Singapore"
      },
      "label": "Home",
      "name": "Andrea Lark",
      "phone": {
        "calling_code": "65",
        "number": "87654321"
      }
    },
    "statement_descriptor": "tzp*yahu_traders",
    "status": "requires_action",
    "status_description": "",
    "success_url": "https://mystore.com/success_page",
    "transaction_data": [],
    "transaction_description": "1 X Goods",
    "transaction_documents": [],
    "webhook_url": "https://webhook.site/ref8y92937922"
  }
}
Confirms that your customer intends to pay with the provided payment method. Upon confirmation, a new payment attempt will be created. You can guide your customer through the next steps using the fields status_description and latest_payment_attempt_data

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

ID of the already created payin

Body

application/json
customer_details
object
required

Details about the customer

success_url
string
required

URL where the customer is directed to after a successful payment

cancel_url
string
required

The URL the customer will be directed to if they decide to cancel payment and return to your website.

payment_method_details
object
required

Pass the data specific to a payment method to confirm a payin and create a payment attempt

session_id
string
required

Mandatory for mobilebanking_thb. Session ID retrieved from the risk SDK

customer
string

ID of the customer for the checkout session

shipping_details
object

Shipping details including recipient name, address and phone

billing_details
object

Billing details including name, address and phone

transaction_documents
string<json>

Supporting documents for the transaction

metadata
string<json>

Set of key-value pairs that can be attached to the object (JSON string format)

Example:

"{\"key1\": \"value1\", \"key2\": \"value2\"}"

reference_id
string

Your unique identifier for the session

statement_descriptor
string

Configure the description of the payment on your customer's statements. It must contain at least one letter and be 1-22 characters long

Response

200 - application/json

200

status
string

Indicates whether the payin creation request succeeded.

message
string

Response message or additional context regarding the payin request.

data
object

Contains detailed information about a payin object.