curl
curl -X POST https://api.paybridgenp.com/v1/sms/notify-pending-payment \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"customerPhone": "9801234567",
"shopName": "Acme Store",
"orderName": "#1042",
"amountMinor": 10000,
"currency": "NPR",
"checkoutUrl": "https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2"
}'import requests
url = "https://api.paybridgenp.com/v1/sms/notify-pending-payment"
payload = {
"customerPhone": "9801234567",
"shopName": "Acme Store",
"orderName": "#1042",
"amountMinor": 10000,
"currency": "NPR",
"checkoutUrl": "https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerPhone: '9801234567',
shopName: 'Acme Store',
orderName: '#1042',
amountMinor: 10000,
currency: 'NPR',
checkoutUrl: 'https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2'
})
};
fetch('https://api.paybridgenp.com/v1/sms/notify-pending-payment', 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://api.paybridgenp.com/v1/sms/notify-pending-payment",
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([
'customerPhone' => '9801234567',
'shopName' => 'Acme Store',
'orderName' => '#1042',
'amountMinor' => 10000,
'currency' => 'NPR',
'checkoutUrl' => 'https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.paybridgenp.com/v1/sms/notify-pending-payment"
payload := strings.NewReader("{\n \"customerPhone\": \"9801234567\",\n \"shopName\": \"Acme Store\",\n \"orderName\": \"#1042\",\n \"amountMinor\": 10000,\n \"currency\": \"NPR\",\n \"checkoutUrl\": \"https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.paybridgenp.com/v1/sms/notify-pending-payment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customerPhone\": \"9801234567\",\n \"shopName\": \"Acme Store\",\n \"orderName\": \"#1042\",\n \"amountMinor\": 10000,\n \"currency\": \"NPR\",\n \"checkoutUrl\": \"https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paybridgenp.com/v1/sms/notify-pending-payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerPhone\": \"9801234567\",\n \"shopName\": \"Acme Store\",\n \"orderName\": \"#1042\",\n \"amountMinor\": 10000,\n \"currency\": \"NPR\",\n \"checkoutUrl\": \"https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2\"\n}"
response = http.request(request)
puts response.read_body{
"sent": true,
"status": "sent"
}{
"error": {
"message": "<string>",
"type": "authentication_error",
"code": "<string>",
"request_id": "req_2Je91NlWKuXkdXUJOK9gaHNW",
"detail": "<string>",
"refund": {
"id": "ref_01j9x2k3m4n5p6q7r8s9t0u1v2",
"livemode": true,
"paymentId": "pay_01j9x2k3m4n5p6q7r8s9t0u1v2",
"projectId": "<string>",
"mode": "sandbox",
"amount": 10000,
"currency": "NPR",
"reason": "customer_request",
"status": "processing",
"providerRefundId": "<string>",
"failureReason": "<string>",
"notes": "<string>",
"mobileNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"suspension": {
"suspended_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"pause": {
"paused_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
}
}{
"error": {
"message": "<string>",
"type": "authentication_error",
"code": "<string>",
"request_id": "req_2Je91NlWKuXkdXUJOK9gaHNW",
"detail": "<string>",
"refund": {
"id": "ref_01j9x2k3m4n5p6q7r8s9t0u1v2",
"livemode": true,
"paymentId": "pay_01j9x2k3m4n5p6q7r8s9t0u1v2",
"projectId": "<string>",
"mode": "sandbox",
"amount": 10000,
"currency": "NPR",
"reason": "customer_request",
"status": "processing",
"providerRefundId": "<string>",
"failureReason": "<string>",
"notes": "<string>",
"mobileNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"suspension": {
"suspended_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"pause": {
"paused_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
}
}{
"error": {
"message": "<string>",
"type": "authentication_error",
"code": "<string>",
"request_id": "req_2Je91NlWKuXkdXUJOK9gaHNW",
"detail": "<string>",
"refund": {
"id": "ref_01j9x2k3m4n5p6q7r8s9t0u1v2",
"livemode": true,
"paymentId": "pay_01j9x2k3m4n5p6q7r8s9t0u1v2",
"projectId": "<string>",
"mode": "sandbox",
"amount": 10000,
"currency": "NPR",
"reason": "customer_request",
"status": "processing",
"providerRefundId": "<string>",
"failureReason": "<string>",
"notes": "<string>",
"mobileNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"suspension": {
"suspended_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"pause": {
"paused_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
}
}{
"error": {
"message": "<string>",
"type": "authentication_error",
"code": "<string>",
"request_id": "req_2Je91NlWKuXkdXUJOK9gaHNW",
"detail": "<string>",
"refund": {
"id": "ref_01j9x2k3m4n5p6q7r8s9t0u1v2",
"livemode": true,
"paymentId": "pay_01j9x2k3m4n5p6q7r8s9t0u1v2",
"projectId": "<string>",
"mode": "sandbox",
"amount": 10000,
"currency": "NPR",
"reason": "customer_request",
"status": "processing",
"providerRefundId": "<string>",
"failureReason": "<string>",
"notes": "<string>",
"mobileNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"suspension": {
"suspended_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"pause": {
"paused_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
}
}SMS
Send a pending-payment SMS reminder
Sends a transactional “complete your payment” SMS to a customer, on the merchant’s behalf, with the merchant’s plan limits, audit trail, and anti-abuse guards applied. Requires the payments:write scope.
Guards (all enforced):
- The recipient must have a pending checkout session on this project within the last 24h - otherwise
400(phone_not_on_session). checkoutUrlmust be on an allowed PayBridgeNP checkout host for the project (canonical host or verified custom domain) - otherwise400(invalid_checkout_host).- Per-merchant abuse limits - otherwise
429(rate_limited).
The merchant’s SMS plan allowance is checked before sending; status reports what happened to the message.
POST
/
v1
/
sms
/
notify-pending-payment
curl
curl -X POST https://api.paybridgenp.com/v1/sms/notify-pending-payment \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"customerPhone": "9801234567",
"shopName": "Acme Store",
"orderName": "#1042",
"amountMinor": 10000,
"currency": "NPR",
"checkoutUrl": "https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2"
}'import requests
url = "https://api.paybridgenp.com/v1/sms/notify-pending-payment"
payload = {
"customerPhone": "9801234567",
"shopName": "Acme Store",
"orderName": "#1042",
"amountMinor": 10000,
"currency": "NPR",
"checkoutUrl": "https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerPhone: '9801234567',
shopName: 'Acme Store',
orderName: '#1042',
amountMinor: 10000,
currency: 'NPR',
checkoutUrl: 'https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2'
})
};
fetch('https://api.paybridgenp.com/v1/sms/notify-pending-payment', 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://api.paybridgenp.com/v1/sms/notify-pending-payment",
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([
'customerPhone' => '9801234567',
'shopName' => 'Acme Store',
'orderName' => '#1042',
'amountMinor' => 10000,
'currency' => 'NPR',
'checkoutUrl' => 'https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.paybridgenp.com/v1/sms/notify-pending-payment"
payload := strings.NewReader("{\n \"customerPhone\": \"9801234567\",\n \"shopName\": \"Acme Store\",\n \"orderName\": \"#1042\",\n \"amountMinor\": 10000,\n \"currency\": \"NPR\",\n \"checkoutUrl\": \"https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.paybridgenp.com/v1/sms/notify-pending-payment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customerPhone\": \"9801234567\",\n \"shopName\": \"Acme Store\",\n \"orderName\": \"#1042\",\n \"amountMinor\": 10000,\n \"currency\": \"NPR\",\n \"checkoutUrl\": \"https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paybridgenp.com/v1/sms/notify-pending-payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerPhone\": \"9801234567\",\n \"shopName\": \"Acme Store\",\n \"orderName\": \"#1042\",\n \"amountMinor\": 10000,\n \"currency\": \"NPR\",\n \"checkoutUrl\": \"https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2\"\n}"
response = http.request(request)
puts response.read_body{
"sent": true,
"status": "sent"
}{
"error": {
"message": "<string>",
"type": "authentication_error",
"code": "<string>",
"request_id": "req_2Je91NlWKuXkdXUJOK9gaHNW",
"detail": "<string>",
"refund": {
"id": "ref_01j9x2k3m4n5p6q7r8s9t0u1v2",
"livemode": true,
"paymentId": "pay_01j9x2k3m4n5p6q7r8s9t0u1v2",
"projectId": "<string>",
"mode": "sandbox",
"amount": 10000,
"currency": "NPR",
"reason": "customer_request",
"status": "processing",
"providerRefundId": "<string>",
"failureReason": "<string>",
"notes": "<string>",
"mobileNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"suspension": {
"suspended_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"pause": {
"paused_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
}
}{
"error": {
"message": "<string>",
"type": "authentication_error",
"code": "<string>",
"request_id": "req_2Je91NlWKuXkdXUJOK9gaHNW",
"detail": "<string>",
"refund": {
"id": "ref_01j9x2k3m4n5p6q7r8s9t0u1v2",
"livemode": true,
"paymentId": "pay_01j9x2k3m4n5p6q7r8s9t0u1v2",
"projectId": "<string>",
"mode": "sandbox",
"amount": 10000,
"currency": "NPR",
"reason": "customer_request",
"status": "processing",
"providerRefundId": "<string>",
"failureReason": "<string>",
"notes": "<string>",
"mobileNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"suspension": {
"suspended_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"pause": {
"paused_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
}
}{
"error": {
"message": "<string>",
"type": "authentication_error",
"code": "<string>",
"request_id": "req_2Je91NlWKuXkdXUJOK9gaHNW",
"detail": "<string>",
"refund": {
"id": "ref_01j9x2k3m4n5p6q7r8s9t0u1v2",
"livemode": true,
"paymentId": "pay_01j9x2k3m4n5p6q7r8s9t0u1v2",
"projectId": "<string>",
"mode": "sandbox",
"amount": 10000,
"currency": "NPR",
"reason": "customer_request",
"status": "processing",
"providerRefundId": "<string>",
"failureReason": "<string>",
"notes": "<string>",
"mobileNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"suspension": {
"suspended_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"pause": {
"paused_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
}
}{
"error": {
"message": "<string>",
"type": "authentication_error",
"code": "<string>",
"request_id": "req_2Je91NlWKuXkdXUJOK9gaHNW",
"detail": "<string>",
"refund": {
"id": "ref_01j9x2k3m4n5p6q7r8s9t0u1v2",
"livemode": true,
"paymentId": "pay_01j9x2k3m4n5p6q7r8s9t0u1v2",
"projectId": "<string>",
"mode": "sandbox",
"amount": 10000,
"currency": "NPR",
"reason": "customer_request",
"status": "processing",
"providerRefundId": "<string>",
"failureReason": "<string>",
"notes": "<string>",
"mobileNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"suspension": {
"suspended_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"pause": {
"paused_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
}
}
}Authorizations
Body
application/json
Was this page helpful?