Request
Create payment request
post/api/v1.0/pis/Request/Create
Request
- Base URL: https://sandbox.tryspare.com
- URL: https://sandbox.tryspare.com/api/v1.0/pis/Request/Create
- Auth: API key in header Authorization
Headers
x-signaturestring required
Json web signature (JWS: RFC7519) of the payment initiation consent request payload in detached mode. <see href="https://datatracker.ietf.org/doc/html/rfc7519" />
Request body
Example request
{
"successRedirectUrl": "https://example.com",
"failureRedirectUrl": "https://example.com",
"currency": "BHD",
"providerId": "00000000-0000-0000-0000-000000000000",
"countryCode": "BH"
}Response
Example response
{
"data": {
"paymentRequestId": "00000000-0000-0000-0000-000000000000",
"amount": {
"currency": {
"id": "00000000-0000-0000-0000-000000000000"
}
},
"consent": {
"connection": {
"provider": {
"id": "00000000-0000-0000-0000-000000000000",
"country": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z",
"currency": {
"id": "00000000-0000-0000-0000-000000000000"
}
},
"logo": "https://example.com"
},
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
},
"executionDateTime": "2025-01-01T00:00:00Z",
"id": "00000000-0000-0000-0000-000000000000",
"customerId": "00000000-0000-0000-0000-000000000000",
"createdAt": "2025-01-01T00:00:00Z"
},
"country": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z",
"currency": {
"id": "00000000-0000-0000-0000-000000000000"
}
},
"debtorAccount": {
"provider": {
"id": "00000000-0000-0000-0000-000000000000",
"country": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z",
"currency": {
"id": "00000000-0000-0000-0000-000000000000"
}
},
"logo": "https://example.com"
},
"id": "00000000-0000-0000-0000-000000000000"
},
"creditorAccount": {
"provider": {
"id": "00000000-0000-0000-0000-000000000000",
"country": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z",
"currency": {
"id": "00000000-0000-0000-0000-000000000000"
}
},
"logo": "https://example.com"
},
"id": "00000000-0000-0000-0000-000000000000"
},
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z",
"executionDateTime": "2025-01-01T00:00:00Z",
"successRedirectUrl": "https://example.com",
"failureRedirectUrl": "https://example.com"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.